package com.cloudkinto.dto.order.returns.pack;

import com.cloudkinto.common.utils.MathUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
public class OrPackDetailDto {
    private Long id;
    private Long returnId;
    @ApiModelProperty("物流追踪号")
    private String trackNo;
    @ApiModelProperty("承运商")
    private String logisticsCarrierName;
    @ApiModelProperty("到仓状态 0 未到 1到了")
    private int reach;

    private Date reachTime;

    @ApiModelProperty("库位id")
    private Long locationId;

    @ApiModelProperty("暂存库位")
    private String locationCode;

    @ApiModelProperty("oms长")
    private Double length;

    @ApiModelProperty("oms宽")
    private Double width;

    @ApiModelProperty("oms高")
    private Double height;

    @ApiModelProperty("oms重")
    private Double weight;


    @ApiModelProperty("wms长")
    private Double lengthW;

    @ApiModelProperty("wms宽")
    private Double widthW;

    @ApiModelProperty("wms高")
    private Double heightW;

    @ApiModelProperty("wms重")
    private Double weightW;

    @ApiModelProperty("备注")
    private String tips;

    @ApiModelProperty("附件id")
    private Long fileId;

    public Double getLength() {
        if (length != null) {
            return MathUtils.numberFormat(length, 4);
        }
        return null;
    }

    public Double getWidth() {
        if (width != null) {
            return MathUtils.numberFormat(width, 4);
        }
        return null;
    }

    public Double getHeight() {
        if (height != null) {
            return MathUtils.numberFormat(height, 4);
        }
        return null;
    }

    public Double getWeight() {
        if (weight != null) {
            return MathUtils.numberFormat(weight, 4);
        }
        return null;    }

    public Double getLengthW() {
        if (lengthW != null) {
            return MathUtils.numberFormat(lengthW, 4);
        }
        return null;
    }

    public Double getWidthW() {
        if (widthW != null) {
            return MathUtils.numberFormat(widthW, 4);
        }
        return null;
    }

    public Double getHeightW() {
        if (heightW != null) {
            return MathUtils.numberFormat(heightW, 4);
        }
        return null;
    }

    public Double getWeightW() {
        if (weightW != null) {
            return MathUtils.numberFormat(weightW, 4);
        }
        return null;
    }
}
